//------------------------------------------------------------------------------
//此代码由工具生成
//请使用partial类进行扩展,避免修改被覆盖
//createTime:2020-12-01 10:17:12
//------------------------------------------------------------------------------
using System.Linq.Expressions;
using System;
using System.Collections.Generic;
using System.Linq;
using XKPlatform.DataModels.Dao.BaseDao;
using XKPlatform.DataModels.Dao.BaseEntity;
using XKPlatform.DataModels;
using XKPlatform.IService;
using FreeSql;

namespace XKPlatform.Service
{
    public partial class SysOperationLogService : BaseFreeSqlDao<SysOperationLog>, ISysOperationLogService
    {
        public bool AddModel(SysOperationLog model)
        {
            return InsertAffrows(model) > 0;
        }

        public bool BatchSave(List<SysOperationLog> models)
        {
            return BatchInsert(models) > 0;
        }

        public (List<SysOperationLog> list, long count) GetList(Expression<Func<SysOperationLog, bool>> where, List<SortInfo<SysOperationLog, object>> orderbys = null, PageInfo pageInfo = null)
        {
            return Query(where, orderbys, pageInfo);
        }

        public SysOperationLog GetModel(Expression<Func<SysOperationLog, bool>> where)
        {
            return GetByOne(where);
        }

        public (List<SysOperationLog>list, long count) GetListByTbName(Expression<Func<SysOperationLog, bool>> where, string tableName, List<SortInfo<SysOperationLog, object>> orderbys = null, PageInfo pageInfo = null)
        {
            return Query(where, tableName, orderbys, pageInfo);
        }

        public bool UpdateModel(SysOperationLog model, Expression<Func<SysOperationLog, bool>> where, Expression<Func<SysOperationLog, object>> IgnoreLmbad = null)
        {
            return Update(model, where, IgnoreLmbad);
        }

        public IUpdate<SysOperationLog> UpdateBySets(Expression<Func<SysOperationLog, bool>> where)
        {
            throw new NotImplementedException();
        }
    }
}
